package com.loukou.lkt.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.loukou.lkt.lkt.req.WhPurchaseOrderDto;
import com.loukou.lkt.lkt.resp.RespDto;
import com.loukou.lkt.lkt.service.AllocationOrderService;

@Controller
@RequestMapping("/api/allocation")
public class AllocationOrderController{
	
	@Autowired
	private AllocationOrderService allocationOrderService;
//
//	@RequestMapping("/sendToWms")
//	@ResponseBody
//	public RespDto<String> sendToWms(@RequestParam(value = "allocationOrderId", required = false, defaultValue = "") int allocationOrderId){
//		RespDto<String> resp = new RespDto<String>();
//		if(allocationOrderId <= 0){
//			resp.setCode(201);
//			resp.setResult("参数错误");
//			return resp;
//		}
//		resp = allocationOrderService.sendAllocationOrderToWms(allocationOrderId);
//		return resp;
//	}
//	
//	/**
//	 * 暂时保留，不做
//	 * @param req
//	 * @return
//	 */
//	@RequestMapping("/receiveWhPurchaseOrder")
//	@ResponseBody
//	public RespDto<String> receiveWhPurchaseOrder(@RequestBody WhPurchaseOrderDto req){
//		RespDto<String> resp = new RespDto<String>();
//		if(req == null || req.getDetails() == null || req.getDetails().size() == 0){
//			resp.setCode(201);
//			resp.setResult("参数错误");
//			return resp;
//		}
//		resp = allocationOrderService.receiveWhPurchaseOrder(req);
//		return resp;
//	}
//	
}
